<?php
/**
 * 外部音乐数据资源
 *
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/13 0013
 * Time: 14:55
 */
namespace app\api\model\outer;

use app\common\helper\Obj2Array;
use think\Model;

class MusicCateModel extends Model{
    protected $table = 'album_mucate';
    protected $connection = 'applet_album_config';

    public static function getCate() {
        $m = new self();
        $cate = $m->field(['id', 'ctitle' => 'title', 'oldtitle' => 'desc'])->select();
        if (!empty($cate)) {
            $cate = Obj2Array::resObject2Array($cate);
        }
        return $cate;
    }
}